package com.maiji.cloud.entities.shopingmall;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 退款表 Description:
 * 
 * @author zhanglr
 * @date 2019年7月29日
 */
@NoArgsConstructor
@Data
@Accessors(chain = true)
@Table(name = "shopping_order_refund")
@TableName("shopping_order_refund")
public class ShoppingOrderRefundEntity {

	@TableId
	@Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
	private String uuId;

	/**
	 * 订单ID
	 */
	@Column(name = "order_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String orderId;

	/**
	 * 退款运单号
	 */
	@Column(name = "refund_num", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String refundNum;

	/**
	 * 退款金额
	 */
	@Column(name = "refund_maney", type = MySqlTypeConstant.DOUBLE, length = 8, decimalLength = 2)
	private Double refundManey;

	/**
	 * 是否退回快递费
	 */
	@Column(name = "return_delivery_fee", type = MySqlTypeConstant.BIT)
	private Boolean returnDeliveryFee;

	/**
	 * 是否退回减肥基金
	 */
	@Column(name = "return_fund", type = MySqlTypeConstant.BIT)
	private Boolean returnFund;

	/**
	 * 是否退回积分
	 */
	@Column(name = "return_integral", type = MySqlTypeConstant.BIT)
	private Boolean returnIntegral;

	/**
	 * 是否退回优惠卷
	 */
	@Column(name = "return_coupon", type = MySqlTypeConstant.BIT)
	private Boolean returnCoupon;

	/**
	 * 退款状态
	 */
	@Column(name = "status", type = MySqlTypeConstant.INT, length = 2, defaultValue = "0")
	private Integer status;// -1未申请或已撤销，0申请中, 1同意，2待退款，3退款中，4退款成功，5拒绝

	/**
	 * 退款类型
	 */
	@Column(name = "type", type = MySqlTypeConstant.INT, length = 2)
	private Integer type;// 1：仅退款未发货，2：退款退货

	/**
	 * 退款说明
	 */
	@Column(name = "refund_explain", type = MySqlTypeConstant.VARCHAR, length = 255)
	private String refundExplain;//退款说明

	/**
	 * 退款原因
	 */
	@Column(name = "refund_reason", type = MySqlTypeConstant.VARCHAR, length = 255)
	private String refundReason;//退款原因

	/**
	 * 申请退款时间
	 */
	@Column(name = "in_time", type = MySqlTypeConstant.DATETIME)
	private Date inTime;

	/**
	 *退款申请审核通过/拒绝时间
	 */
	@Column(name = "stay_refund_time", type = MySqlTypeConstant.DATETIME)
	private Date stayRefundTime;

    /**
     * 确认收货
     */
    @Column(name = "confirm_received", type = MySqlTypeConstant.BIT)
    private Boolean confirmReceived;
	
	/**
	 * 确认收货时间
	 */
	@Column(name = "confirm_received_time", type = MySqlTypeConstant.DATETIME)
	private Date confirmReceivedTime;

	/**
	 * 退款执行时间
	 */
	@Column(name = "refund_middle_time", type = MySqlTypeConstant.DATETIME)
	private Date refundMiddleTime;
	
	/**
	 * 退款到账完成时间
	 */
	@Column(name = "refund_finish_time", type = MySqlTypeConstant.DATETIME)
	private Date refundFinishTime;

	/**
	 * 退款撤销时间
	 */
	@Column(name = "refund_cancel_time", type = MySqlTypeConstant.DATETIME)
	private Date refundCancelTime;

	// 审核拒绝原因
    @Column(name = "refusal_reason", type = MySqlTypeConstant.VARCHAR)
    private String refusalReason;

}
